/* 
 * File:   glUtils.h
 * Author: ferranferri
 *
 * Created on June 3, 2013, 12:25 PM
 */

#ifndef _Z3D_GLUTILS_H
#define	_Z3D_GLUTILS_H


#include "Log/LogSystem.h"

#ifdef _DEBUG
    #define CHECK_OPENGL_ERROR \
    { GLenum error; \
      while ( (error = glGetError()) != GL_NO_ERROR) { \
        glog::CGlobalLog::getSingleton().WARNING_MSG("Z3D_ENGINE", "OpenGL ERROR: %s\nCHECK POINT: %s (line %d)\n" , gluErrorString(error), __FILE__, __LINE__ );  \
      } \
    }
#else
    #define CHECK_OPENGL_ERROR void(0);
#endif //_DEBUG
        
#endif	/* _Z3D_GLUTILS_H */

